package org.grayrabbit.cms.util;

import javax.servlet.http.HttpSessionAttributeListener;
import javax.servlet.http.HttpSessionBindingEvent;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

public class  UserSessionListener implements HttpSessionListener, HttpSessionAttributeListener{

	
	public void sessionCreated(HttpSessionEvent se) {
		synchronized (UserSessionContext.class) {
			UserSessionContext.put(se);
		}
	}

	public void sessionDestroyed(HttpSessionEvent se) {
		synchronized (UserSessionContext.class) {
			UserSessionContext.remove(se);
		}
	}

	public void attributeAdded(HttpSessionBindingEvent se) {
		synchronized (UserSessionContext.class) {
			UserSessionContext.put(se);
		}
		
	}

	public void attributeRemoved(HttpSessionBindingEvent se) {

	}

	public void attributeReplaced(HttpSessionBindingEvent se) {
		
		
	}
	
	
}
